//Returns the URL changed so that increases in one the page number
function IncrementURLPageParam(ServicePathParams)
{
			
	var AllParameters = ServicePathParams;
	var nvPairs = AllParameters.split("&");

	var ModifiedAllParameters = "";
	for (i = 0; i < nvPairs.length; i++)
	{
		var nvPair = nvPairs[i].split("=");
		var name = nvPair[0];
		var value = nvPair[1];

		if (name=="Page") value++;
		ModifiedAllParameters += name+"="+value+"&";
	}
	
	ModifiedAllParameters = ModifiedAllParameters.substring(0,(ModifiedAllParameters.length-1));

	return ModifiedAllParameters;
}

function DecrementURLPageParam(ServicePathParams)
{
	var AllParameters = ServicePathParams;
	var nvPairs = AllParameters.split("&");

	var ModifiedAllParameters = "";
	
	for (i = 0; i < nvPairs.length; i++)
	{
		var nvPair = nvPairs[i].split("=");
		var name = nvPair[0];
		var value = nvPair[1];

		if (name=="Page" && value > 1) value--;
		ModifiedAllParameters += name+"="+value+"&";
	}
	
	ModifiedAllParameters = ModifiedAllParameters.substring(0,(ModifiedAllParameters.length-1));

	return ModifiedAllParameters;
}

function ResetURLPageParamTo1(ServicePathParams)
{
	var AllParameters = ServicePathParams;
	var nvPairs = AllParameters.split("&");

	var ModifiedAllParameters = "";
	
	for (i = 0; i < nvPairs.length; i++)
	{
		var nvPair = nvPairs[i].split("=");
		var name = nvPair[0];
		var value = nvPair[1];

		if (name=="Page" && value > 1) value=0;
		ModifiedAllParameters += name+"="+value+"&";
	}
	
	ModifiedAllParameters = ModifiedAllParameters.substring(0,(ModifiedAllParameters.length-1));

	return ModifiedAllParameters;

}